var gulp = require('gulp'),
    clean = require('gulp-clean'),
    zip = require('gulp-zip'),
    runSequence = require('gulp-sequence');

var config = require('../config.js');

gulp.task('clean',function() {
    return gulp.src(['release']).pipe(clean());
});

gulp.task('copyToRelease',function() {
    return gulp.src(['src/**/**','!src/**/scss','!src/**/scss/**']).pipe(gulp.dest('release'));
});

gulp.task('zip',function() {
    return gulp.src(['release/**/**']).pipe(zip(config.build.release_name + '.zip')).pipe(gulp.dest(''));
});

gulp.task('release',function() {
    runSequence('clean','copyToRelease','zip');
});